home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / rtextu10.zip / NODUP.DOC < prev    next >
Text File  |  1993-05-06  |  5KB  |  138 lines

  1.  
  2.  
  3.                     #     #         ######                 
  4.                     ##    #   ####  #     #  #    #  ##### 
  5.                     # #   #  #    # #     #  #    #  #    #
  6.                     #  #  #  #    # #     #  #    #  #    #
  7.                     #   # #  #    # #     #  #    #  ##### 
  8.                     #    ##  #    # #     #  #    #  #     
  9.                     #     #   ####  ######    ####   #     
  10.  
  11.  
  12.  
  13.  
  14. You can get part of the following documentation by invoking the program with
  15. the switches -v, -h, or -H . See README.TXT for more information.
  16.  
  17. -----------------------------------   -v   ------------------------------------
  18. NODUP v1.0 -- Remove successive equal lines from text files
  19. Copr (c) 1992,1993 Richard Breuer. NODUP is freeware. No warranties.
  20.  
  21. This is NODUP/2 v1.0 - renamed to NODUP (from RUTILS 4).
  22.  
  23. Author: Richard Breuer
  24.         Brunssumstrasse 6
  25.         5100 Aachen
  26.         (after Jul 1, 1993: 52074 Aachen)
  27.         Germany
  28.         Europe
  29.  
  30. Phone:  +49/241/85605
  31. Fax:    +49/241/8021329
  32.  
  33. Email:  ricki@pool.informatik.rwth-aachen.de (Preferred!)
  34.  
  35. -----------------------------------   -h   ------------------------------------
  36. NODUP v1.0 -- Remove successive equal lines from text files
  37. Copr (c) 1992,1993 Richard Breuer. NODUP is freeware. No warranties.
  38.  
  39. Usage:
  40.    NODUP [-b:e:hHiv*] infile.. [{>|>>} outfile]
  41.  
  42. Options:
  43.    -b[n]  The comparison begins at column n. If n is 0 or negative, it is
  44.           computed to length(line)-n. Default is n=1
  45.    -e[n]  The comparison ends at column n.  If n is 0 or negative, it is
  46.           computed to length(line)-n. Default is n=0
  47.    -h     Display this help screen
  48.    -H     Display another help screen with notes and examples
  49.    -i     NODUP ignores upper or lower case. Default is case sensitivity
  50.    -v     Display version info and information about the author
  51.    -*     Display internal information (for debugging purposes)
  52.  
  53. -----------------------------------   -H   ------------------------------------
  54. NODUP v1.0 -- Remove successive equal lines from text files
  55. Copr (c) 1992,1993 Richard Breuer. NODUP is freeware. No warranties.
  56.  
  57. Notes:
  58.    NODUP reads from stdin if a filename is -. The output is always directed
  59.    to stdout. The line lengths are restricted to 255 characters. Longer lines
  60.    will be cut. The errorlevel is set to 1 if help has been displayed. It is
  61.    set to 255 in case of an error and 0 on normal completion. Output resulting
  62.    from multiple input files is appended to stdout. The processing order for
  63.    wildcards depends on the order of the directory entries. NODUP returns
  64.    nonsense for binary files.
  65.  
  66. Examples:
  67.    NODUP *.TXT -
  68.       After processing all TXT files in the current directory the user must
  69.       input text from the keyboard until Ctrl/Z (=EOF) is detected. All output
  70.       is appended on stdout. The order of the files is the one DOS's dir tells
  71.       you.
  72.    DIR | NODUP -b10 -e10
  73.       If the directory is sorted by extensions, NODUP shows only the first
  74.       file for each extension in the list.
  75.  
  76. -------------------------------------------------------------------------------
  77. Additional information:
  78.    NODUP was actually the starting point for all the other programs. I searched
  79.    for this program some time, could not locate it, and decided to write it
  80.    myself. It has been useful in many situations since then. Whenever you have
  81.    a list of any kind and want to get rid of double entries, NODUP comes up.
  82.    It is especially useful in combination with the SORT command, because SORT
  83.    arranges all equal lines of a file in one block after each other. NODUP can
  84.    then be used to remove all successive lines but the first.
  85.  
  86. Examples:
  87.    Consider the following file FOO.DAT:
  88.  
  89.         >Name A<
  90.         >Name B<
  91.         >File A<
  92.         >File A<
  93.         >Name C<
  94.         >Name C<
  95.         >Name C<
  96.  
  97.    Applying NODUP to it produces the following result:
  98.  
  99.      NODUP FOO.DAT
  100.         >Name A<
  101.         >Name B<
  102.         >File A<
  103.         >Name C<
  104.  
  105.    You expected this, didn't you :-) NODUP removed all successive equal lines
  106.    from FOO.DAT and wrote the result to standard output. In this case, the
  107.    result of
  108.                 SORT < FOO.DAT | NODUP
  109.    would have been
  110.         >File A<
  111.         >Name A<
  112.         >Name B<
  113.         >Name C<
  114.  
  115.    The options -b and -e allow you to decrease the range of rtext which is
  116.    relevant for NODUP for determining whether two lines are equal. Thus
  117.                 SORT < FOO.DAT | NODUP -e4
  118.    results in
  119.         >File A<
  120.         >Name A<
  121.  
  122.    because 'Name A', 'Name B', and 'Name C' are all equal if you look only at
  123.    the characters 1..4.
  124.  
  125.    On the other hand,
  126.                 SORT < FOO.DAT | NODUP -b5
  127.    gives
  128.         >File A<
  129.         >Name B<
  130.         >Name C<
  131.  
  132.    because now 'File A' = 'Name A', restricted to characters 5..6.
  133.  
  134.    The switch -i needs no further explanation, I guess. Oops, I should mention
  135.    that it is aware of the following characters (besides the usual, of course):
  136.           ä - Ä   ö - Ö   ü - Ü   å - Å   æ - Æ   é - É   ñ - Ñ   ç - Ç
  137.  
  138.